import { BulletManager } from "./manager/BulletManager"
import { TankManager } from "./manager/TankManager"
import { Player } from "./tank/Player"

class MyGame {
    public bulletManager: BulletManager = null

    public tankManager: TankManager = null

    public maxEnemyNum: number = 2

    public spawnEnemyNum: number = 5

    public genEnemyNum: number = 0

    public enemyDieNum: number = 0

    public level: number = 0

    public player: Player = null

    public isGameOver: boolean = false

    public playerMaxLife : number = 3

    constructor() {
        this.level = 1
    }

    checkIsWin() {
        return this.enemyDieNum == this.maxEnemyNum
    }

    nextLevel() {
        this.level++
        this.genEnemyNum = 0
        this.enemyDieNum = 0
    }
}

export const myGame = new MyGame()